package com.cskaoyan.bean.order.wxGetOrder;

import com.cskaoyan.bean.order.Chanal.Chanal;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

@Data
public class OrderExpName {

    private Integer id;
    private Integer userId;
    private String orderSn;
    private Short orderStatus;
    private Short aftersaleStatus;
    private String consignee;
    private String mobile;
    private String address;
    private String message;
    private BigDecimal goodsPrice;
    private BigDecimal freightPrice;
    private BigDecimal couponPrice;
    private BigDecimal integralPrice;
    private BigDecimal grouponPrice;
    private BigDecimal orderPrice;
    private BigDecimal actualPrice;
    private String payId;
    private LocalDateTime payTime;
    private String shipSn;
    private String shipChannel;
    private LocalDateTime shipTime;
    private BigDecimal refundAmount;
    private String refundType;
    private String refundContent;
    private LocalDateTime refundTime;
    private LocalDateTime confirmTime;
    private Short comments;
    private LocalDateTime endTime;
    private LocalDateTime addTime;
    private LocalDateTime updateTime;
    private Boolean deleted;

    HandleOption handleOption;

    String expNo;
    String expName;

    public void setShipSn(String shipSn) {
        this.shipSn = shipSn;
        this.setExpNo(shipSn);
    }

    public void setExpNo(String shipSn) {
        this.expNo = shipSn;
    }

    public void setShipChannel(String shipChannel) {
        this.shipChannel = shipChannel;
        this.setExpName(shipChannel);
    }

    public void setExpName(String shipChannel) {

        this.expName = "神秘人";

        if ("ZTO".equals(shipChannel)) {
            this.expName = "中通快递";
        }
        if ("YTO".equals(shipChannel)) {
            this.expName = "圆通速递";
        }
        if ("YD".equals(shipChannel)) {
            this.expName = "韵达速递";
        }
        if ("YZPY".equals(shipChannel)) {
            this.expName = "邮政快递包裹";
        }
        if ("EMS".equals(shipChannel)) {
            this.expName = "EMS";
        }
        if ("TNT".equals(shipChannel)) {
            this.expName = "TNT快递";
        }
        if ("UPS".equals(shipChannel)) {
            this.expName = "UPS";
        }
        if ("DHL".equals(shipChannel)) {
            this.expName = "DHL";
        }
        if ("FEDEX".equals(shipChannel)) {
            this.expName = "FEDEX联邦(国内件)";
        }
        if ("FEDEX_GJ".equals(shipChannel)) {
            this.expName = "FEDEX联邦(国际件)";
        }
    }
}